import axios from "axios";

// axios.interceptors.request.use(()=>{},error => {
//     console.log(error);
// })

const baseUrl = '';
export const getRequest = (url, data) => {
    return axios({
        url: `${baseUrl}${url}`,
        method: 'get',
        data: data
    });
}

export const postRequest = (url, data) => {
    return axios({
        url: `${baseUrl}${url}`,
        method: 'post',
        data: data
    });
}

export const putRequest = (url, data) => {
    return axios({
        url: `${baseUrl}${url}`,
        method: 'put',
        data: data
    });
}

export const deleteRequest = (url, data) => {
    return axios({
        url: `${baseUrl}${url}`,
        method: 'delete',
        data: data
    });
}

export const batchRequest=(url,data)=>{
    return axios({
        url: `${baseUrl}${url}`,
        method: 'batch',
        data: data
    });
}
